Storage apparatus and controlling method

ABSTRACT

A storage apparatus includes a storage medium configured to store data and a control unit configured to control access to the storage medium. The control unit includes first storage configured to store data to be stored in the storage medium, a second storage configured to store data, a control information generator configured to generate control information indicating a storage state of the data in the first storage and a transfer controller configured to control transfer of the data stored in the first storage to the second storage on the basis of the control information generated by the control information generator when the supply of power to the control unit is stopped.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2010-209389, filed on Sep. 17, 2010, the entire contents of which are incorporated herein by reference.

FIELD

The embodiments discussed herein are related to a storage apparatus and a controlling method of a storage apparatus.

BACKGROUND

Increase in storage capacities has been progressing in storage apparatuses using storage media including magnetic disks, magneto-optical disks, and optical disks. In order to increase the storage capacities of the storage apparatuses, a technology called Redundant Arrays of Inexpensive Disks (RAID) to use multiple storage media to compose a storage apparatus is in widespread use.

Readout and writing of user data by using a cache memory is generally performed in such a storage apparatus in order to reduce the processing time needed for data access from a higher-level apparatus (for example, a host computer). A semiconductor memory, such as a dynamic random access memory (DRAM) or a static random access memory (SRAM), is normally used as the cache memory.

Upon reception of a request to read out user data from the host computer, the storage apparatus searches the cache memory for the user data to acquire the user data corresponding to the readout request and notifies the host computer of cache data that is acquired. If no user data is acquired from the cache memory, the storage apparatus acquires the user data stored in a storage device, such as a hard disk drive (HDD), and writes the acquired user data in the cache memory.

Upon reception of a request to write user data, the storage apparatus notifies the host computer that a writing process is completed at the time when the user data is stored in the cache memory. Then, the storage apparatus stores the user data stored in the cache memory in a disk.

Since a volatile semiconductor memory is used as the cache memory described above, the user data in the cache memory is erased with no supply of power to the cache memory. Accordingly, at the time of power failure, some storage apparatuses perform a backup process to save all the data in the cache memory in a non-volatile memory by using power for emergency.

However, with the technology in related art mentioned above, it takes a long time to perform the backup process. In this case, there is a problem in that the saving of the data stored in the cache memory in the non-volatile memory is not completed within a time period in which the power for emergency is capable of being supplied and, therefore, the data that is not saved is lost. Japanese Laid-open Patent Publication Nos. 6-309234 and 9-330277 are examples of related art

SUMMARY

According to an aspect of the embodiment, a storage apparatus includes a storage medium configured to store data and a control unit configured to control access to the storage medium. The control unit includes first storage configured to store data to be stored in the storage medium, a second storage configured to store data, a control information generator configured to generate control information indicating a storage state of the data in the first storage and a transfer controller configured to control transfer of the data stored in the first storage to the second storage on the basis of the control information generated by the control information generator when the supply of power to the control unit is stopped.

The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating a storage apparatus according to a first embodiment;

FIG. 2 is a block diagram illustrating an example of the hardware configuration of a storage apparatus of a second embodiment;

FIG. 3 is a block diagram illustrating examples of the functions of the storage apparatus of the second embodiment;

FIG. 4 illustrates an example of a cache memory and a descriptor table according to the second embodiment;

FIG. 5 illustrates examples of writing caches and readout caches stored in the cache memory according to the second embodiment:

FIG. 6 illustrates an example of another cache memory and another descriptor table while a process of storing writing data in the cache memory is being executed according to the second embodiment;

FIG. 7 is a flowchart illustrating an example of a writing data caching process according to the second embodiment;

FIG. 8 illustrates an example of another cache memory and another descriptor table while a process of writing back the writing data in storage devices is being executed according to the second embodiment;

FIG. 9 is a flowchart illustrating an example of a writing data write-back process according to the second embodiment;

FIG. 10 is a flowchart illustrating an example of a writing data backup process according to the second embodiment;

FIG. 11 is a sequence chart illustrating an exemplary operation to store the writing data in the cache memory according to the second embodiment;

FIG. 12 is a sequence chart illustrating an exemplary operation to transmit readout data to a host computer according to the second embodiment;

FIG. 13 is a sequence chart illustrating an exemplary operation to write back the writing data in the storage devices according to the second embodiment; and

FIG. 14 is a sequence chart illustrating an exemplary operation to back up the writing data in a flash memory according to the second embodiment.

DESCRIPTION OF EMBODIMENTS

Preferred embodiments of the present techniques will be explained with reference to accompanying drawings.

First Embodiment

FIG. 1 is a block diagram illustrating a storage apparatus according to a first embodiment. Referring to FIG. 1, a storage apparatus 1 of the present embodiment includes a control unit 1 a and a storage medium 1 b that stores data. The control unit is controls access to the storage medium 1 b. The control unit is includes a storage part 1 a 3, a storage part 1 a 4, a control information generator 1 a 1, and a transfer controller 1 a 2.

The control unit 1 a controls the storage apparatus 1. For example, the control unit 1 a controls writing and readout of data in and from the storage medium 1 b on the basis of transmission and reception of the data between the storage apparatus 1 and a higher-level apparatus, such as a host computer.

The control information generator 1 a 1 generates control information indicating the storage state of data in the storage part 1 a 3 in advance. The control information is used by the transfer controller 1 a 2 to transfer the data stored in the storage part 1 a 3 to the storage part 1 a 4. The control information indicates, for example, whether each piece of the data stored in the storage part 1 a 3 is to be transferred, the position where each piece of the data is stored in a storage area in the storage part 1 a 3, and the size of each piece of the data at transfer. With the control information, it is possible to rapidly transfer the data if supply of power from a commercial power supply or the like, which is normally used, is stopped.

The transfer controller 1 a 2 controls the transfer of the data stored in the storage part 1 a 3 to the storage part 1 a 4 on the basis of the control information generated by the control information generator 1 a 1 when the supply of power to the control unit is is stopped.

The storage part 1 a 3 temporarily stores data to be stored in the storage medium 1 b until writing of the data in the storage medium 1 b is completed. The storage part 1 a 3 is, for example, a volatile semiconductor memory, such as a DRAM or a SRAM. Accordingly, the data stored in the storage part 1 a 3 is lost if the supply of power to the storage part 1 a 3 is stopped owing to, for example, an occurrence of power failure before the writing of the data in the storage medium 1 b is completed.

The storage part 1 a 4 is capable of holding data, for example, by using a non-volatile memory as the storage part 1 a 4 or receiving supply of power for emergency, separately from the storage part 1 a 3, even if the supply of power to the control unit 1 a is stopped owing to, for example, an occurrence of power failure. In the present embodiment, when the supply of power is stopped, the data stored in the storage part 1 a 3 is transferred to the non-volatile storage part 1 a 4 by the transfer controller 1 a 2 to back up the data stored in the storage part 1 a 3. Since the data stored in the storage part 1 a 3 is transferred to the non-volatile storage part 1 a 4 at the time of power failure, it is possible to prevent the data stored in the storage part 1 a 3 from being lost.

The storage medium 1 b stores data that is transmitted to and received from a higher-level apparatus. For example, a magnetic storage device such as an HDD, an optical disk, a magneto-optical recording medium, a non-volatile semiconductor memory such as a solid state drive (SSD), or another storage medium capable of storing data may be used as the storage medium 1 b. The magnetic storage device is, for example, an HDD, a flexible disk (FD), or a magnetic tape. The optical disk is, for example, a digital versatile disk (DVD), a DVD-RAM, or a compact disc-read only memory/rewritable (CD-ROM/RW). The magneto-optical recording medium is, for example, a magneto-optical (MO) disk. The storage medium 1 b may be a RAID including multiple storage media.

As described above, in the present embodiment, the control information generator 1 a 1 normally generates the control information indicating the storage state of the data stored in the storage part 1 a 3. If the supply of power is stopped, the transfer controller 1 a 2 transfers the data stored in the storage part 1 a 3 to the storage part 1 a 4 on the basis of the control information. Accordingly, it is possible to speed up the backup process of data to reduce the time needed for the backup process.

Second Embodiment

In a second embodiment, the function of the storage apparatus 1 illustrated in FIG. 1 to transfer data from the storage part 1 a 3 to the storage part 1 a 4 when the supply of power is stopped is applied to a storage apparatus 100 including groups of storage devices composing RAIDs.

FIG. 2 is a block diagram illustrating an example of the hardware configuration of the storage apparatus 100 of the second embodiment. Referring to FIG. 2, the storage apparatus 100 includes control units 110 a and 110 b that control the entire apparatus, channel adapters 130 c to 130 f that control connection between the control units 110 a and 110 b and a host computer 300, storage devices 120 a, 120 b, 120 c and 120 d, and power supply units (PSUs) 140 a and 140 b.

The storage apparatus 100 inputs and outputs data into and from the multiple storage devices, such as hard disk drives, described below. The storage apparatus 100 has RAID functions including RAID 0 to 6. The multiple storage devices are integrated to compose RAIDs and each of the RAIDs is managed as one storage device.

The host computer 300 executes operational processes and is connected to the storage apparatus 100 via a storage area network (SAN) using a fibre channel so as to be capable of data communication. The host computer 300 stores data used in the operational processes in the storage apparatus 100 and reads out the data from the storage apparatus 100.

The control unit 110 a includes a central processing unit (CPU) 111 a, a cache memory 112 a, device adapters 113 c and 113 d, a flash controller 114 a, a flash memory 115 a, and a system capacity unit (SCU) 116 a.

The CPU 111 a executes processing in accordance with, for example, an operating system (OS) to perform various control processes. The control unit 110 a manages resources including the cache memory 112 a, the storage devices 120 a, 120 b, 120 c, and 120 d, and the channel adapters 130 c and 130 d.

The cache memory 112 a stores control data, such as descriptor information used in a backup process of writing data, which is needed by the CPU 111 a to control the storage apparatus 100. In addition, the cache memory 112 a temporarily stores writing data that is transmitted from the host computer 300 and that is to be stored in the storage devices 120 a to 120 d and readout data that is read out from the storage devices 120 a to 120 d in response to a readout request transmitted from the host computer 300 and that is to be transmitted to the host computer 300.

The device adapters 113 c and 113 d control connection with the storage devices 120 a to 120 d.

The flash controller 114 a is a field programmable gate array (FPGA), which is an integrated circuit controlled by a certain program, and controls the flash memory 115 a. The flash controller 114 a adapts Direct Memory Access (DMA) having a function needed for saving cache data in the flash memory 115 a at the time of power failure and decomposing the cache data. Accordingly, the flash controller 114 a is capable of transferring data between the storage apparatus 100 and the cache memory 112 a or the flash memory 115 a through hardware not via the CPU 111 a. The flash controller 114 a backs up the writing data in the cache memory 112 a in the flash memory 115 a on the basis of the descriptor information at the time of power failure to save the writing data. Since the flash memory 115 a, which is a NAND memory, has a structure in which access is performed in units of blocks, the writing data in the cache memory 112 a is written into the flash memory 115 a not in a random access mode but in a sequential write mode. The block means a data area in which the writing data is stored in the flash memory 115 a and indicates a physical division unit of the flash memory 115 a. The writing data is written into the flash memory 115 a for every block. The data area per one block in the flash memory 115 a may have a size of four megabytes, which is convenient for the sequential write mode. At the time of power restoration, the flash controller 114 a reads out the writing data saved in the flash memory 115 a at the time of power failure and decomposes the writing data in the cache memory 112 a.

The flash memory 115 a is a rewritable non-volatile semiconductor memory, such as a NAND flash memory. The flash memory 115 a is used as a destination where the data is saved at the time of power failure. At the time of power failure, the flash controller 114 a temporarily stores the descriptor information and the writing data that is accumulated in the cache memory 112 a and that has not been stored in the storage devices 120 a to 120 d in the flash memory 115 a while the control unit 110 a is turned off. Then, the flash controller 114 a reads out the data saved in the flash memory 115 a at the time of power restoration and uses the readout data.

The SCU 116 a is a high-capacity capacitor. The control unit 110 a charges the power, which is normally supplied from the PSUs 140 a and 140 b, in the SCU 116 a. The SCU 116 a supplies the power to the control unit 110 a at the time of power failure. Since the SCU 116 a supplies the charged power to the control unit 110 a, a limited amount of power is supplied to the control unit 110 a. The SCU 116 a uses an “electric double layer” (an insulating material is sandwiched between conductors and the charge is accumulated in response to a voltage that is applied) to physically accumulate the charge. Accordingly, since deterioration owing to the charge or discharge is suppressed in the SCU 116 a, compared with a battery that chemically accumulates the charge, and the power is charged at a speed at which the charge moves, the time needed for the charging is relatively short.

The storage apparatus 100 switches the source of the power to be supplied to the control unit 110 a from the PSUs 140 a and 140 b to the SCU 116 a at the time of power failure. The control unit 110 a uses the power charged in the SCU 116 a to back up the writing data.

The control unit 110 a is connected to the control unit 110 b via a bus 150. The control information and data are communicated between the control unit 110 a and the control unit 110 b through the bus 150. The control units 110 a and 110 b are detachably mounted to the storage apparatus 100. The control unit 110 b includes a CPU 111 b, a cache memory 112 b, device adapters 113 e and 113 f, a flash controller 114 b, a flash memory 115 b, and a SCU 116 b. Since the control unit 110 b has the same configuration as that of the control unit 110 a, a description the configuration of the control unit 110 b is omitted herein.

The storage devices 120 a to 120 d are hard disk drives that are capable of composing a RAID and stores user data transmitted from the host computer 300. The user data is not necessarily stored in one hard disk and may be stored in multiple hard disks. Alternatively, multiple pieces of user data may be stored in one hard disk. For example, a non-volatile semiconductor memory such as an SSD, a magnetic storage device other than the HDD, an optical disk, a magneto-optical recording medium, or another storage medium capable of storing data may be used as each of the storage devices 120 a to 120 d. The magnetic storage device is, for example, a hard disk device, a flexible disk, or a magnetic tape. The optical disk is, for example, a DVD, a DVD-RAM, or a CD-ROM/RW. The magneto-optical recording medium is, for example, an MO disk.

The channel adapters 130 c to 130 f control connection between the host computer 300 and the control units 110 a and 110 b. For example, the channel adapter 130 c controls connection with the control unit 110 a in response to a request from the host computer 300. The control units 110 a and 110 b are each capable of being connected to multiple (two in FIG. 2) channel adapters, among the channel adapters 130 c to 130 f. Specifically, for example, the control unit 110 a is connected to the two different channel adapters 130 c and 130 d so as to realize a redundant configuration.

Although the communication between the channel adapters 130 c to 130 f and the host computer 300 is established via the SAN using the fibre channel, the communication may be established by a connection method other than the fibre channel. Alternatively, the communication between the channel adapters 130 c to 130 f and the host computer 300 may be established via a dedicated line or a virtual private network (VPN) and the storage apparatus 100 may be installed at a site remote from the host computer 300.

The PSUs 140 a and 140 b supply power used in each component in the storage apparatus 100 to the component in the storage apparatus 100. The PSUs 140 a and 140 b are redundant and are capable of supplying the power needed for driving each component in the storage apparatus 100 as long as either of them is normally operated.

Although the two control units 110 a and 110 b are illustrated, the two device adapters 113 c and 113 d and the two channel adapters 130 c and 130 d are illustrated for the control unit 110 a, and the two device adapters 113 e and 113 f and the two channel adapters 130 e and 130 f are illustrated for the control unit 110 b in FIG. 2, the numbers of the control units, the device adapters, and the channel adapters may be arbitrarily set.

Although one host computer 300 is connected to the storage apparatus 100 in FIG. 2, multiple host computers may be connected to the storage apparatus 100.

An extension apparatus (not illustrated) including a control unit and storage devices, which are controlled dependently of the control units 110 a and 110 b, may be connected to the storage apparatus 100.

With the above hardware configuration, it is possible to realize the processing function of the present embodiment.

FIG. 3 is a block diagram illustrating examples of the functions of the storage apparatus 100 of the second embodiment. Referring to FIG. 3, the storage apparatus 100 of the present embodiment includes the control unit 110 a, the PSUs 140 a and 140 b, and the storage devices 120 a to 120 d. The control unit 110 a includes a main control part 101, a transfer controller 102, the cache memory 112 a, the flash memory 115 a, and the SCU 116 a. The main control part 101 includes a descriptor information generator 101 a, a data controller 101 b, and a storage location determiner 101 c. The control unit 110 a will now be described. Since the control unit 110 b has the same configuration and function as those of the control unit 110 a, a description of the configuration and function of the control unit 110 b is omitted herein.

The control unit 110 a controls the storage apparatus 100. For example, the control unit 110 a controls writing and readout of data in and from the storage devices 120 a to 120 d on the basis of, for example, transmission and reception of the data between the storage apparatus 100 and a higher-level apparatus, such as the host computer 300.

Upon reception of an instruction to store data in the storage devices 120 a to 120 d from the host computer 300, the descriptor information generator 101 a generates descriptor information indicating the storage state of the data in the cache memory 112 a based on the storage instruction. The descriptor information is an example of the control information. The descriptor information generator 101 a is an example of a control information generating part.

The descriptor information is used by the transfer controller 102 to transfer the data stored in the cache memory 112 a to the flash memory 115 a. The descriptor information includes, for example, determination information indicating whether each piece of the data stored in the cache memory 112 a is to be transferred; storage location information indicating a storage location that is of each piece of the data stored in the cache memory 112 a and that is determined by the storage location determiner 101 c; subsequent data location information indicating an initial address of a storage area which is next to the storage area in the cache memory 112 a where the data is stored and in which other subsequent data is stored; and transfer size information indicating, for example, the size of each piece of the data at transfer. With the above information, it is possible to rapidly transfer the data when the supply of power is stopped.

When the data stored in the cache memory 112 a is to be transferred, the descriptor information generator 101 a generates the descriptor information so as to include the determination information indicating that the data stored in the cache memory 112 a is data to be transferred (hereinafter referred to as a transfer target data) (a writing cache).

When the data stored in the cache memory 112 a is not to be transferred, the descriptor information generator 101 a generates the descriptor information so as to include the determination information indicating that the data stored in the cache memory 112 a is not the transfer target data (a readout cache).

When the data (the writing data) to be stored in the storage devices 120 a to 120 d is stored in the cache memory 112 a, the descriptor information generator 101 a generates the descriptor information so as to include the determination information indicating that the data stored in the cache memory 112 a is the transfer target data.

When the storage of the data to be stored in the storage devices 120 a to 120 d in the storage devices 120 a to 120 d is completed, the descriptor information generator 101 a generates the descriptor information so as to include the determination information indicating that the data that has been stored in the cache memory 112 a is not the transfer target data.

In addition, the descriptor information generator 101 a generates the descriptor information so as to include the storage location information and the subsequent data location information about the data stored in the cache memory 112 a.

Furthermore, the descriptor information generator 101 a generates the descriptor information about the data stored in the cache memory 112 a and stores the generated descriptor information at a location which corresponds to the location determined by the storage location determiner 101 c and at which the descriptor information is stored in a descriptor table.

The descriptor information generator 101 a may generate the control information indicating the storage state of the data in the cache memory 112 a in advance in preparation for stop of the supply of power at arbitrary timing, such as every predetermined time, each time a certain amount of data is written, or each time a certain number of data items are written.

The data controller 101 b controls the data that is transmitted from the host computer 300 and that is to be stored in the storage devices 120 a to 120 d so as to be stored in a free space in the storage area in the cache memory 112 a on the basis of the storage location information in the descriptor information generated by the descriptor information generator 101 a.

The storage location determiner 101 c determines the storage location of data in the storage area in the cache memory 112 a on the basis of the free space in the storage area in the cache memory 112 a and the size of the data stored in the cache memory 112 a in the storage of the data that is transmitted from the host computer 300 and that is to be stored in the storage devices 120 a to 120 d in the cache memory 112 a.

The transfer controller 102 controls the transfer target data, among the data stored in the cache memory 112 a on the basis of the descriptor information generated by the descriptor information generator 101 a, and the descriptor information stored in the cache memory 112 a so as to be transferred to the flash memory 115 a when the supply of power to the control unit 110 a is stopped. Since the descriptor information that indicates the storage state of the backed-up data and that is used in the restoration is transferred to the flash memory 115 a along with the data to be backed up at stop of the supply of power in the present embodiment, it is possible to speed up a restoration process of the data at restart of the supply of power.

The transfer controller 102 controls the data that is not the transfer target data, among the data stored in the cache memory 112 a on the basis of the descriptor information generated by the descriptor information generator 101 a, so as not to be transferred to the flash memory 115 a.

When the supply of power to the control unit 110 a is stopped, the transfer controller 102 divides the data stored in the cache memory 112 a into multiple pieces of data on the basis of the descriptor information generated by the descriptor information generator 101 a. Then, the transfer controller 102 controls the transfer of the data stored in the cache memory 112 a to the flash memory 115 a such that the multiple pieces of data resulting from the division are concurrently transferred to the multiple storage areas.

When the supply of power to the control unit 110 a is stopped, the transfer controller 102 receives the supply of power from the SCU 116 a and controls the transfer of the data stored in the cache memory 112 a to the flash memory 115 a.

In saving of the writing data in the cache memory 112 a, the transfer controller 102 divides the multiple pieces of writing data stored in the cache memory 112 a into two groups. The transfer controller 102 stores one of the two groups in a non-volatile storage area 115 a 1 and stores the remaining group in a non-volatile storage area 115 a 2 concurrently with the writing into the non-volatile storage area 115 a 1. Accordingly, it is possible to reduce the time needed for saving the writing data in the flash memory 115 a.

In restoration of the data saved in the flash memory 115 a, the transfer controller 102 decomposes the descriptor information saved in the flash memory 115 a in a descriptor area 112 ad in the cache memory 112 a. Then, the transfer controller 102 refers to the descriptor information decomposed in the descriptor area 112 ad to sequentially decompose the saved writing cache in the storage area in the cache memory 112 a from the initial address of the storage area in the cache memory 112 a.

The cache memory 112 a temporarily stores the data to be stored in the storage devices 120 a to 120 d until the writing into the storage devices 120 a to 120 d is completed. The cache memory 112 a is a volatile semiconductor memory, such as a DRAM or a SRAM. Accordingly, the data stored in the cache memory 112 a is lost if the supply of power to the cache memory 112 a is stopped owing to, for example, an occurrence of power failure before the writing into the storage devices 120 a to 120 d is completed.

The cache memory 112 a includes the descriptor area 112 ad where the descriptor information is stored. The descriptor information and the descriptor table are stored in the descriptor area 112 ad. In the descriptor table, the locations where the descriptor information is stored in the storage area in the cache memory 112 a are associated with the locations where the data is stored in the storage area in the cache memory 112 a. The descriptor area 112 ad is an example of a control information storage part. The descriptor table will be described in detail with reference to FIG. 4.

The flash memory 115 a is a non-volatile memory including multiple storage areas (for example, the non-volatile storage areas 115 a 1 and 115 a 2). The flash memory 115 a is capable of holding the stored data even when the supply of power to the control unit 110 a is stopped owing to, for example, an occurrence of power failure. In the present embodiment, when the supply of power is stopped, the data stored in the cache memory 112 a is transferred to the flash memory 115 a by the transfer controller 102 by using the power received from the SCU 116 a to back up the data stored in the cache memory 112 a. Since the data stored in the cache memory 112 a is transferred to the non-volatile flash memory 115 a at the time of power failure, it is possible to prevent the data stored in the cache memory 112 a from being lost. Although the flash memory 115 a includes the two non-volatile storage areas in the present embodiment, the number of the non-volatile storage areas is not limited to two. The flash memory 115 a may include one non-volatile storage area or three or more non-volatile storage areas.

The storage devices 120 a to 120 d are hard disk drives that store data transmitted to and received from a higher-level apparatus to compose a RAID.

The SCU 116 a supplies a certain amount of power to each component in the control unit 110 a when the supply of power which is supplied from the PSUs 140 a and 140 b to the control unit 110 a and which is normally used is stopped. The SCU 116 a is capable of supplying power sufficient for the transfer controller 102 of the present embodiment to transfer the writing cache in the backup process even when the supply of power which is normally used is stopped. In the present embodiment, it is possible to suppress an increase in size of the data to be backed up and to improve the efficiency of the backup process with the descriptor information, thereby reducing the power supply capacity needed for the SCU 116 a.

Although the flash memory 115 a is used to back up the data in the cache memory 112 a in the present embodiment, the backup process is not limited to this. A volatile semiconductor memory may be used for the backup and the SCU 116 a may supply power to the volatile semiconductor memory at stop of the supply of power to the control unit 110 a to back up the data in the cache memory 112 a. In other words, a volatile memory may be used, instead of the non-volatile memory, to back up the data in the cache memory 112 a.

FIG. 4 illustrates an example of the cache memory and the descriptor table according to the second embodiment. A descriptor table 112 ad 1 in which the descriptor information stored in the cache memory 112 a is held is illustrated in FIG. 4.

The cache memory 112 a temporarily stores the writing data that is transmitted from the host computer 300 and that is to be stored in the storage devices 120 a to 120 d and the readout data that is read out from the storage devices 120 a to 120 d and that is to be transmitted to the host computer 300, in the storage apparatus 100. Although the cache memory 112 a has a storage capacity of two gigabytes in the present embodiment, the storage capacity of the cache memory 112 a is not limited to this and the cache memory 112 a may have an arbitrary storage capacity. The storage area in the cache memory 112 a is managed in units of subareas each having a certain storage capacity (for example, four megabytes corresponding to each block in the flash memory 115 a). Each storage subarea resulting from the division in the cache memory 112 a is set as a writing cache area, a readout cache area, a descriptor area, or an excluded-from-backup-process area.

The writing cache area is a storage subarea in the cache memory 112 a, in which the writing cache that includes the writing data that has not been stored in the storage devices 120 a to 120 d and that is data to be backed up is stored. The readout cache area is a storage subarea in the cache memory 112 a, in which only the readout cache is stored. The readout cache is data that is not to be backed up, such as the writing data that has been stored in the storage devices 120 a to 120 d and the readout data that is read out from the storage devices 120 a to 120 d and is to be transmitted to the host computer 300. The descriptor area is a storage subarea in the cache memory 112 a, in which the descriptor information is stored. The excluded-from-backup-process area is a storage subarea in the cache memory 112 a, in which data that is not to be backed up, such as control data that is not needed to be backed up, is stored.

In the example in FIG. 4, a writing cache area 112 a 00, readout cache areas 112 a 01 to 112 a 04, writing cache areas 112 a 05 and 112 a 06, a readout cache area 112 a 07, . . . , a readout cache area 112 a 0 e, a descriptor area 112 a 0 d, and an excluded-from-backup-process area 112 a 0 x are set in the cache memory 112 a.

The writing cache area 112 a 00 is a 4-MB storage area including one block and has the writing cache stored therein. The readout cache areas 112 a 01 to 112 a 04 are a 16-MB storage area including four blocks and each have the readout cache stored therein. The writing cache areas 112 a 05 and 112 a 06 are an 8-MB storage area including two blocks and each have the writing cache stored therein. The readout cache area 112 a 07 is a 4-MB storage area including one block and has the readout cache stored therein. The readout cache area 112 a 0 e is a 4-MB storage area including the final one block and has the readout cache stored therein. The descriptor area 112 a 0 d has the descriptor information stored therein. The excluded-from-backup-process area 112 a 0 x is an 8-MB storage area and has, for example, the control data that is not needed to be backed up stored therein.

The descriptor table 112 ad 1 is stored in the descriptor area 112 a 0 d in the cache memory 112 a included in the storage apparatus 100. The descriptor table 112 ad 1 holds the descriptor information indicating the writing cache, which is the writing data stored in the cache memory 112 a included in the storage apparatus 100. The descriptor table 112 ad 1 is an example of a control table.

Items including “address”, “transfer size”, “determination code”, and “next address” are set in the descriptor table 112 ad 1. Information items laterally arranged across the items are associated with each other as the descriptor information in the descriptor table 112 ad 1.

The address is information indicating a mapping address of each storage subarea stored in the cache memory 112 a (the initial address of each of the storage subareas divided in association with the blocks in the flash memory 115 a). The address is allocated to each storage subarea in the cache memory 112 a such that the integer value is incremented one by one from “0” in ascending order for every certain storage capacity (for example, four gigabytes), which is used as one unit in the transfer of the data to the flash memory 115 a in the backup process. The address is an example of the storage location information.

The descriptor information is collectively set in the beginning block, among multiple successive blocks in which the caches of the same type, the writing cache or the readout cache, are stored (hereinafter referred to as same-type successive blocks). The writing cache area 112 a 00 in FIG. 4 is a single non-successive block and the descriptor information on the writing cache area 112 a 00 is set at an address “0.” The descriptor information on the readout cache areas 112 a 01 to 112 a 04 is set at an address “1” because the readout cache areas 112 a 01 to 112 a 04 are successive areas and have the readout caches stored therein. Similarly, the descriptor information on the writing cache areas 112 a 05 and 112 a 06 is set at an address “5.” The descriptor information on the readout cache area 112 a 07 is set at an address “7.” The descriptor information on the readout cache area 112 a 0 e is set at an address “509.” “0” is set to the transfer size, the determination code, and the next address of each block that is not the beginning block in the same-type successive blocks.

The transfer size is information indicating the size (MB) of each block stored in the cache memory 112 a at transfer to the flash memory 115 a. The transfer size is expressed in a certain storage capacity unit. For example, when the certain storage capacity is four megabytes, the transfer size is expressed as a multiple of the certain storage capacity, such as “0” (MB), “4”, “8”, or “12.” The transfer size of the same-type successive blocks is set in the descriptor information on the beginning block. For example, the transfer size of the readout cache areas 112 a 01 to 112 a 04 is set as “16” in the descriptor information at the address “1.” The transfer size is an example of the transfer size information.

The determination code is information indicating whether the data in each block is to be backed up. When the block includes the writing data that has not been stored in the storage devices 120 a to 120 d, “1” is set as the determination code. When the block does not include data that has not been stored in the storage devices 120 a to 120 d (that is, when all the data in the block is the readout data or when the block includes only the writing data that has been stored in the storage devices 120 a to 120 d), “0” is set as the determination code. In the backup process, the transfer controller 102 determines whether each block is to be backed up on the basis of the determination code and stores only the data stored in the blocks to be backed up in the flash memory 115 a. The determination code of the same-type successive blocks is set in the descriptor information on the beginning block. For example, the determination code of the readout cache areas 112 a 01 to 112 a 04 is set as “0” in the descriptor information at the address “1” (readout cache). The determination code is an example of the determination information.

The next address is information indicating the mapping address of the next block. In the backup process of the writing data, the transfer controller 102 acquires the address of the next block indicated in the next address and acquires the descriptor information on the next block on the basis of the acquired address of the next block. “NULL” is set in the next address of the final data block (the readout cache area 112 a 0 e) in the cache memory 112 a. When the transfer controller 102 acquires NULL, the transfer controller 102 terminates the backup process of the cache memory 112 a at the block for which NULL is acquired and backs up the descriptor area 112 a 0 d and other needed control information. The next address of the same-type successive blocks is set in the descriptor information on the beginning block. For example, the next address of the readout cache areas 112 a 01 to 112 a 04 is set as “5” (the mapping address of the next block) in the descriptor information at the address “1.” The next address is an example of the subsequent data location information.

When the transfer controller 102 stores the block to be backed up in the flash memory 115 a, the determination of whether each block is to be backed up may be based on the descriptor information on the beginning block in the same-type successive blocks. In this case, since the descriptor information having “0” in the transfer size, the determination code, and the next address concerns a block that is not the beginning block in the same-type successive blocks, the block may be excluded from the readout target.

FIG. 5 illustrates examples of the writing caches and the readout caches stored in the cache memory according to the second embodiment. As described above, either of the writing cache area to be backed up and the readout cache area not to be backed up is set to each storage subarea in the cache memory 112 a in the present embodiment. In the example in FIG. 5, writing cache areas 112 a 10 and 112 a 11 and a readout cache area 112 a 12 each having a storage capacity of four megabyte are set in the cache memory 112 a.

The writing cache area is a storage subarea in which the writing cache is partially or wholly stored, as described above. The writing cache is the writing data that has not been stored in the storage devices 120 a to 120 d and that is be backed up. As illustrated in FIG. 5, writing caches 112 a 100 and 112 a 102 and a readout cache 112 a 101 are stored in the writing cache area 112 a 10. Since the writing caches 112 a 100 and 112 a 102 are stored in the writing cache area 112 a 10, the writing cache area 112 a 10 corresponds to the writing cache area. Similarly, a writing cache 112 a 110 is stored in the writing cache area 112 a 11. Since the writing cache 112 a 110 is stored in the writing cache area 112 a 11, the writing cache area 112 a 11 corresponds to the writing cache area.

The readout cache area is a storage subarea in which no writing cache is stored and in which only the readout cache is stored, as described above. The readout cache is data that is not to be backed up, such as the writing data that has been stored in the storage devices 120 a to 120 d or the readout data that is read out from the storage devices 120 a to 120 d and is to be transmitted to the host computer 300. As illustrated in FIG. 5, a readout cache 112 a 120 is stored in the readout cache area 112 a 12. Since no writing cache is stored in the readout cache area 112 a 12, the readout cache area 112 a 12 corresponds to the readout cache area.

FIG. 6 illustrates an example of the cache memory and the descriptor table while a process of storing the writing data in the cache memory is being executed according to the second embodiment. The cache memory 112 a included in the storage apparatus 100 of the present embodiment and a descriptor table 112 ad 2 are illustrated in FIG. 6. The descriptor information stored in the cache memory 112 a while the process of storing the writing data in the cache memory is being executed is held in the descriptor table 112 ad 2.

In the example in FIG. 6, the writing data is stored in the readout cache area 112 a 01 in the state in FIG. 4. As a result, the readout cache area 112 a 01 in FIG. 4 is changed to a writing cache area 112 a 21. The settings of writing cache areas 112 a 20, 112 a 25, and 112 a 26 and readout cache areas 112 a 22 to 112 a 24, 112 a 27, and 112 a 2 e are not changed from the corresponding writing cache area 112 a 00, 112 a 05, and 112 a 06 and the readout cache areas 112 a 02 to 112 a 04, 112 a 07, and 112 a 0 e in FIG. 4.

Storing the writing data in the readout cache area 112 a 01 to change the readout cache area 112 a 01 to the writing cache area 112 a 21 causes the descriptor information corresponding to the readout cache area 112 a 01 to be updated. Specifically, the transfer size (four megabytes per block) of the address “1” of the descriptor table 112 ad 2 in which the descriptor information on the writing cache area 112 a 21 is stored is updated to “4” indicating the size at the transfer of the writing cache area 112 a 21 after the change to the flash memory 115 a. The determination code of the address “1” is updated to “1” indicating that the writing cache area 112 a 21 after the change is the writing cache area. The next address of the address “1” is updated to “2” indicating the mapping addresses of the readout cache areas 112 a 22 to 112 a 24 in the next block.

While the settings for the readout cache areas 112 a 02 to 112 a 04 (that is, the readout cache areas 112 a 22 to 112 a 24) are kept on the basis of the storage of the writing data in the readout cache area 112 a 01 to update the readout cache area 112 a 01 to the writing cache area 112 a 21, the descriptor information on the readout cache area 112 a 22, which is the beginning block, is reset. Specifically, the transfer size of the address “2” of the descriptor table 112 ad 2 in which the descriptor information on the readout cache area 112 a 22 is stored is updated to “12” indicating the size at the transfer of the readout cache areas 112 a 22 to 112 a 24, which are the same-type successive blocks, to the flash memory 115 a. The determination code of the address “2” is kept at “0” indicating that the readout cache areas 112 a 22 to 112 a 24 are the readout cache areas. The next address of the address “2” is updated to “5” indicating the mapping address of the writing cache areas 112 a 25 and 112 a 26 in the next block.

FIG. 7 is a flowchart illustrating an example of a writing data caching process according to the second embodiment. Upon reception of the writing data to be stored in the storage devices 120 a to 120 d from the host computer 300, the storage apparatus 100 of the present embodiment executes the writing data caching process to temporarily store the received writing data in the cache memory 112 a and to generate and update the descriptor information upon completion of the storage of the writing data in the cache memory 112 a. The writing data caching process in FIG. 7 will now be described in accordance with the operation numbers in the flowchart.

In S11, the main control part 101 receives the writing data transmitted from the host computer 300.

In S12, the main control part 101 causes the cache data of the writing data (the writing cache) received in S11 to be stored in the cache memory 112 a. For example, the writing cache, which is the cache data of the writing data, is stored in the writing cache area 112 a 21 in FIG. 6.

In S13, the main control part 101 generates the descriptor information in which the storage of the writing data is reflected upon completion of the storage of the writing data in the cache memory 112 a in S12 and updates the descriptor information stored in the descriptor area in the cache memory 112 a with the generated descriptor information. Specifically, the writing cache is stored in the writing cache area 112 a 21 in FIG. 6. In this case, as in the descriptor information at the address “1” in the descriptor table 112 ad 2 in FIG. 6, the descriptor information in which the transfer size is set to “4” (because the writing cache area 112 a 21 is a single non-successive writing cache area), the determination code is set to “1” (the writing cache (to be backed up)), and the next address is set to “2” (the mapping address of the readout cache area 112 a 22, which the subsequent storage area) is generated and the generated descriptor information is set in the descriptor table 112 ad 2.

In S14, the main control part 101 updates the descriptor information if it is needed to change the descriptor information on the storage area next to the storage area in which the writing cache is stored upon generation of the descriptor information in S13. For example, the writing cache is stored in part of the blocks in the readout cache areas, which is the same-type successive blocks, and the readout cache area is changed to the writing cache area. In this case, the multiple successive readout cache areas are separated or the type of the storage area of the beginning block is changed. As a result, the transfer size and/or the next address of the descriptor information in the readout cache area next to the writing cache area in which the writing cache is stored and is subjected to change may be changed. In such a case, the descriptor information generator 101 a updates the descriptor information according to need. Specifically, as in the descriptor information at the address “2” in the descriptor table 112 ad 2 in FIG. 6, the descriptor information in which the transfer size is set to “12” (the size of the readout cache areas 112 a 22 to 112 a 24, which are the same-type successive blocks even after the storage of the writing cache), the determination code is set to “0” (the readout cache (not to be backed up)), and the next address is set to “5” (the mapping address of the writing cache area 112 a 25, which the subsequent storage area) is generated and the generated descriptor information is set in the descriptor table 112 ad 2. Then, the writing data caching process is terminated.

Although, after the writing data is stored in the cache memory 112 a in S12, the descriptor information is generated in S13 and the descriptor information in the descriptor area is updated in S14 in the writing data caching process of the present embodiment, the writing data caching process is not limited to this. The writing data may be stored in the cache memory 112 a after the generation and the update of the descriptor information are completed.

FIG. 8 illustrates an example of the cache memory and the descriptor table while a process of writing back the writing data in the storage devices is being executed according to the second embodiment. The cache memory 112 a included in the storage apparatus 100 of the present embodiment and a descriptor table 112 ad 3 are illustrated in FIG. 8. The descriptor information stored in the cache memory 112 a while a write-back process to store the writing data stored in the cache memory 112 a in the storage devices 120 a to 120 d is being executed is held in the descriptor table 112 ad 3.

In the example in FIG. 8, the writing data stored in the writing cache area 112 a 05 in the state in FIG. 4 is written back into the storage devices 120 a to 120 d. As a result, the writing cache area 112 a 05 in FIG. 4 is changed to a readout cache area 112 a 35 because the backup process is not needed for the block stored in the writing cache area 112 a 05. The settings of writing cache areas 112 a 30 and 112 a 36 and readout cache areas 112 a 31 to 112 a 34, 112 a 37, and 112 a 3 e are not changed from the corresponding writing cache area 112 a 00 and 112 a 06 and the readout cache areas 112 a 01 to 112 a 04, 112 a 07, and 112 a 0 e in FIG. 4.

Writing back the writing data stored in the writing cache area 112 a 05 to change the writing cache area 112 a 05 to the readout cache area 112 a 35 causes the descriptor information corresponding to the writing cache area 112 a 05 to be updated. Specifically, the transfer size of the address “5” of the descriptor table 112 ad 3 in which the descriptor information on the readout cache area 112 a 35 is stored is updated to “4” indicating the size at the transfer of the readout cache area 112 a 35 after the change to the flash memory 115 a. The determination code of the address “5” is updated to “0” indicating that the readout cache area 112 a 35 after the change is the readout cache area. The next address of the address “5” is updated to “6” indicating the mapping addresses of the writing cache area 112 a 36 in the next block.

While the settings for the writing cache area 112 a 06 (that is, the writing cache area 112 a 36) are kept on the basis of the write-back of the writing data in the writing cache area 112 a 05 to update the writing cache area 112 a 05 to the readout cache area 112 a 35, the descriptor information on the writing cache area 112 a 36 is reset. Specifically, the transfer size of the address “6” of the descriptor table 112 ad 3 in which the descriptor information on the writing cache area 112 a 36 is stored is updated to “4” indicating the size at the transfer of the writing cache area 112 a 36 to the flash memory 115 a. The determination code of the address “6” is updated to “1” indicating that the writing cache area 112 a 36 is the writing cache area. The next address of the address “6” is updated to “7” indicating the mapping address of the readout cache area 112 a 37 in the next block.

FIG. 9 is a flowchart illustrating an example of a writing data write-back process according to the second embodiment. The storage apparatus 100 of the present embodiment executes the writing data write-back process to perform the write-back process in which the writing data that is transmitted from the host computer 300 and that has been stored in the cache memory 112 a is stored into the storage devices 120 a to 120 d and to generate and update the descriptor information upon writing of the writing data into the storage devices 120 a to 120 d. The writing data write-back process in FIG. 9 will now be described in accordance with the operation numbers in the flowchart.

In S21, the main control part 101 executes the write-back process to store the writing data that has been stored in the cache memory 112 a and that has not been stored in the storage devices 120 a to 120 d in the storage devices 120 a to 120 d. For example, the writing cache that is stored in the readout cache area 112 a 35 in FIG. 8 is written back into the storage devices 120 a to 120 d.

In S22, the main control part 101 generates the descriptor information in which the write-back of the writing data is reflected upon write-back of the writing data in S21 and updates the descriptor information stored in the descriptor area in the cache memory 112 a with the generated descriptor information. Specifically, the writing cache stored in the readout cache area 112 a 35 in FIG. 8 is stored in the storage devices 120 a to 120 d, as described above. In this case, as in the descriptor information at the address “5” in the descriptor table 112 ad 3 in FIG. 8, the descriptor information in which the transfer size is set to “4” (because the readout cache area 112 a 35 is a single non-successive writing cache area), the determination code is set to “0” (the readout cache (not to be backed up)), and the next address is set to “6” (the mapping address of the writing cache area 112 a 36, which the subsequent storage area) is generated and the generated descriptor information is set in the descriptor table 112 ad 3.

In S23, the main control part 101 updates the descriptor information if it is needed to change the descriptor information on the storage area next to the storage area the writing data in which is stored in the storage devices 120 a to 120 d upon generation of the descriptor information in S22. For example, all the data in part of the blocks in the writing cache areas, which is the same-type successive blocks, is stored in the storage devices 120 a to 120 d and the writing cache area is changed to the readout cache area. In this case, the multiple successive writing cache areas are separated or the type of the storage area of the beginning block is changed. As a result, the transfer size and/or the next address of the descriptor information in the writing cache area next to the readout cache area that is changed on the basis of the storage of the writing cache in the storage devices 120 a to 120 d may be changed. In such a case, the descriptor information generator 101 a updates the descriptor information according to need. Specifically, as in the descriptor information at the address “6” in the descriptor table 112 ad 3 in FIG. 8, the descriptor information in which the transfer size is set to “4” (the size of the writing cache area 112 a 36 after the writing cache is stored), the determination code is set to “1” (the writing cache (to be backed up)), and the next address is set to “7” (the mapping address of the readout cache area 112 a 37, which the subsequent storage area) is generated and the generated descriptor information is set in the descriptor table 112 ad 3. Then, the writing data write-back process is terminated.

Although, after the writing data is written back in the storage devices 120 a to 120 d in S21, the descriptor information is generated in S22 and the descriptor information in the descriptor area is updated in S23 in the writing data write-back process of the present embodiment, the writing data write-back process is not limited to this. The writing data may be written back in the storage devices 120 a to 120 d after the generation and the update of the descriptor information are completed.

FIG. 10 is a flowchart illustrating an example of a writing data backup process according to the second embodiment. The storage apparatus 100 of the present embodiment executes the writing data backup process to store the writing data that has not been written back, among the data stored in the cache memory 112 a, in the flash memory 115 a to back up the writing data at the time of power failure. The writing data backup process in FIG. 10 will now be described in accordance with the operation numbers in the flowchart.

In S31, the transfer controller 102 sequentially reads out one piece of the descriptor information stored in the cache memory 112 a from the beginning.

In S32, the transfer controller 102 determines whether the descriptor information read out in S31 indicates the writing data. If the descriptor information indicates the writing data (YES in S32), the process goes to S33. If the descriptor information does not indicate the writing data (NO in S32), the process goes to S34.

In S33, the transfer controller 102 stores the writing data indicated in the descriptor information, which is determined to concern the writing data in S32, in the flash memory 115 a.

In S34, the transfer controller 102 determines whether the descriptor information that is most recently read out in S31 is the last one and the readout of all the descriptor information stored in the cache memory 112 a is completed. If the readout of all the descriptor information is completed (YES in S34), the process goes to S35. If the readout of all the descriptor information is not completed (NO in S34), the process goes back to S31.

In S35, the transfer controller 102 stores the descriptor information stored in the descriptor area in the cache memory 112 a in the flash memory 115 a. Then, the writing data backup process is terminated.

FIG. 11 is a sequence chart illustrating an exemplary operation to store the writing data in the cache memory according to the second embodiment. In the storage apparatus 100 of the present embodiment, the main control part 101 temporarily stores the writing data transmitted from the host computer 300 in the cache memory 112 a, generates the descriptor information on the writing data, and performs the update by using the generated descriptor information. The storage of the transmitted writing data in the cache memory 112 a and the generation and the update of the descriptor information will now be described in accordance with the sequence chart in FIG. 11.

In S111, the host computer 300 transmits the writing data to the storage apparatus 100. The main control part 101 supplies the writing data received by the storage apparatus 100 to the cache memory 112 a.

In S112, the cache memory 112 a stores the writing data transmitted in S111 under the control of the main control part 101. Upon completion of the storage of the received writing data in the cache memory 112 a, the main control part 101 transmits a response indicating that the writing of the received writing data in the cache memory 112 a is completed to the host computer 300.

In S113, the main control part 101 generates the descriptor information in which the storage of the writing data in the cache memory 112 a is reflected upon completion of the storage of the writing data in the cache memory 112 a in S112 and supplies the generated descriptor information to the cache memory 112 a.

In S114, the cache memory 112 a updates the descriptor information stored in the descriptor area with the descriptor information generated in S113 under the control of the main control part 101.

The update of the descriptor information in another storage area next to the writing cache area in the cache memory 112 a in which the writing data is stored, based on the storage of the writing data in the cache memory 112 a in S112, is performed by the main control part 101 in accordance with S14 in FIG. 7, although a description thereof is omitted in FIG. 11.

FIG. 12 is a sequence chart illustrating an exemplary operation to transmit the readout data to the host computer according to the second embodiment. In the storage apparatus 100 of the present embodiment, after the main control part 101 reads out the data stored in the storage devices 120 a to 120 d in response to a readout command transmitted from the host computer 300 and temporarily stores the readout data in the cache memory 112 a, the main control part 101 transmits the readout data to the host computer 300, generates the descriptor information, and performs the update by using the generated descriptor information. The readout of the readout data from the storage devices 120 a to 120 d, requested from the host computer 300, the storage of the readout data in the cache memory 112 a and the transmission of the readout data to the host computer 300, and the generation and the update of the descriptor information will now be described in accordance with the sequence chart in FIG. 12.

In S121, the host computer 300 transmits a readout command to request the storage apparatus 100 to read out the readout data and identify the readout data to the storage apparatus 100.

In S122, the storage devices 120 a to 120 d read out the readout data identified by the readout command received in 5121 from the storage area in any of the storage devices 120 a to 120 d and supply the readout data to the cache memory 112 a under the control of the main control part 101.

In S123, the cache memory 112 a stores the readout data supplied in S122 under the control of the main control part 101.

In S124, the cache memory 112 a transmits the readout data stored in S123 to the host computer 300 under the control of the main control part 101.

In S125, the main control part 101 generates the descriptor information in which the storage of the readout data in the cache memory 112 a is reflected upon completion of the storage of the readout data in the cache memory 112 a in S123 and supplies the generated descriptor information to the cache memory 112 a.

In S126, the cache memory 112 a updates the descriptor information stored in the descriptor area with the descriptor information generated in S125 under the control of the main control part 101.

The main control part 101 does not update the descriptor information in another storage area next to the readout cache area in the cache memory 112 a from which the readout data is read out in S126 because the descriptor information in the other storage area is not to be backed up both before and after the readout. However, the processing in the main control part 101 is not limited to the above and the main control part 101 may update the descriptor information in another storage area next to the readout cache area from which the data is read out, as in the storage of the writing data in the cache memory 112 a in FIG. 11.

FIG. 13 is a sequence chart illustrating an exemplary operation to write back the writing data in the storage devices according to the second embodiment. In the storage apparatus 100 of the present embodiment, the main control part 101 asynchronously stores the writing data that is transmitted from the host computer 300 and that is temporarily stored in the cache memory 112 a in the storage devices 120 a to 120 d, generates the descriptor information on the writing data, and performs the update by using the generated descriptor information. The writing of the writing data stored in the cache memory 112 a in the storage devices 120 a to 120 d and the generation and the update of the descriptor information will now be described in accordance with the sequence chart in FIG. 13.

In S131, the cache memory 112 a supplies the writing data identified by the main control part 101, among the writing data stored in the cache memory 112 a, to the storage devices 120 a to 120 d under the control of the main control part 101.

In S132, the storage devices 120 a to 120 d stores the writing data supplied from the cache memory 112 a in their storage areas under the control of the main control part 101.

In S133, the main control part 101 generates the descriptor information in which the writing of the writing data in the storage devices 120 a to 120 d is reflected upon writing of the writing data in the storage devices 120 a to 120 d in S132 and supplies the generated descriptor information to the cache memory 112 a.

In 5134, the cache memory 112 a updates the descriptor information stored in the descriptor area with the descriptor information generated in S133 under the control of the main control part 101.

The update of the descriptor information in another storage area next to the readout cache area in the cache memory 112 a from which the writing data is read out, based on the writing of the writing data in the storage devices 120 a to 120 d in S132, is performed by the main control part 101 in accordance with S23 in FIG. 9, although a description thereof is omitted in FIG. 13.

FIG. 14 is a sequence chart illustrating an exemplary operation to back up the writing data in the flash memory according to the second embodiment. In the storage apparatus 100 of the present embodiment, at the time of power failure, the main control part 101 notifies the transfer controller 102 of the occurrence of power failure and the initial address of the descriptor area in which the descriptor information is stored in the cache memory 112 a. Upon notification of the occurrence of power failure and the descriptor area, the transfer controller 102 reads out the descriptor information from the cache memory 112 a and writes the writing data into the non-volatile storage areas 115 a 1 and 115 a 2 in the flash memory 115 a to back up the writing data. The notification of an occurrence of power failure and the initial address of the descriptor area and the backup of the writing data will now be described in accordance with the sequence chart in FIG. 14.

In S141, the main control part 101 acquires the initial address of the descriptor area from the cache memory 112 a and notifies the transfer controller 102 of an occurrence of power failure and the acquired initial address of the descriptor area.

In S142, the transfer controller 102 reads out one piece of descriptor information from the descriptor area in the cache memory 112 a. When the transfer controller 102 reads out the descriptor information first after receiving the notification of an occurrence power failure, the transfer controller 102 reads out the descriptor information stored in the storage area in the cache memory 112 a, indicated by the initial address of the descriptor area notified with the occurrence of power failure. In contrast, when the transfer controller 102 subsequently reads out the descriptor information, the transfer controller 102 reads out the descriptor information stored in the storage area in the cache memory 112 a, indicated by the next address in the last descriptor information that is read out.

If the data (the writing data or the readout data) indicated by the descriptor information read out in S142 is the writing data to be backed up, in S143, the transfer controller 102 reads out the writing data from the cache memory 112 a. If the data indicated by the descriptor information read out in S142 is the readout data not to be backed up, the transfer controller 102 does not read out the readout data from the cache memory 112 a because the backup is not performed for the readout data.

In S144, the transfer controller 102 supplies the writing data to the non-volatile storage areas 115 a 1 and 115 a 2 if the writing data is read out in S143.

In S145 a, the non-volatile storage area 115 a 1 stores the writing data supplied from the transfer controller 102 in S144 under the control of the transfer controller 102.

In S145 b, the non-volatile storage area 115 a 2 stores the writing data supplied from the transfer controller 102 in 5144 under the control of the transfer controller 102, as in S145 a.

In S146, the transfer controller 102 supplies the descriptor information corresponding to the writing data stored in the respective storage areas to the non-volatile storage areas 115 a 1 and 115 a 2 if the saving of all the writing data is completed.

In 5147 a, the non-volatile storage area 115 a 1 stores the descriptor information supplied from the transfer controller 102 in S146 under the control of the transfer controller 102.

In S147 b, the non-volatile storage area 115 a 2 stores the descriptor information supplied from the transfer controller 102 in S146 under the control of the transfer controller 102, as in 5147 a.

The writing data that has been stored in the cache memory 112 a and that has not been stored in the storage devices 120 a to 120 d is saved in the flash memory 115 a in S145 a and S145 b.

The flash memory 115 a of the present embodiment includes the non-volatile storage areas 115 a 1 and 115 a 2. The transfer controller 102 of the present embodiment divides the multiple pieces of writing data stored in the cache memory 112 a into two groups in the saving of the writing data in the cache memory 112 a. The transfer controller 102 stores one of the two groups in the non-volatile storage area 115 a 1 and stores the remaining group in the non-volatile storage area 115 a 2 concurrently with the writing into the non-volatile storage area 115 a 2. Accordingly, it is possible to reduce the time needed for saving the writing data in the flash memory 115 a.

S142 to S145 a and S145 b are repeated until the saving of the writing data that has been stored in the cache memory 112 a and that has not been stored in the storage devices 120 a to 120 d in the non-volatile storage areas 115 a 1 and 115 a 2 is completed.

Although the transfer controller 102 supplies the descriptor information corresponding to the writing data stored in the respective storage areas to the non-volatile storage areas 115 a 1 and 115 a 2 where the descriptor information is stored in S146, the processing in transfer controller 102 is not limited to this. The transfer controller 102 may supply all the descriptor information including the descriptor information corresponding to the writing data stored in the non-volatile storage areas 115 a 1 and 115 a 2 to the non-volatile storage areas 115 a 1 and 115 a 2 where all the descriptor information may be stored. Alternatively, the transfer controller 102 may supply all the descriptor information to either of the non-volatile storage areas 115 a 1 and 115 a 2 where all the descriptor information may be stored.

As described above, since the storage apparatus 100 of the second embodiment generates the descriptor information indicating the storage state of the data in the cache memory 112 a, it is possible to speed up the backup process of the data temporarily stored in the cache memory 112 a to reduce the time needed for the backup process. Accordingly, it is possible to suppress an occurrence of a state in which the saving of the data in the cache memory 112 a in the flash memory 115 a is not completed owing to shortage of power accumulated in the SCU 116.

Since the determination code in the descriptor information is used to indicate whether the data stored in the cache memory 112 a is to be backed up and the data to be backed up is transferred on the basis of the descriptor information at transfer, it is possible to reduce the time needed for the transfer process.

When the writing data transmitted from the host computer 300 is stored in the cache memory 112 a, the descriptor information is generated such that it is indicated that the data is to be backed up. Accordingly, it is possible to reflect the latest state of the cache memory 112 a in the descriptor information when the data to be backed up occurs.

When the writing of the writing data transmitted from the host computer 300 in the storage devices 120 a to 120 d is completed, the writing data is excluded from the backup target in the descriptor information. Accordingly, it is possible to prevent unnecessary data from being backed up, thereby suppressing an increase in the time needed for the backup process.

Since the descriptor information is stored in the cache memory 112 a and the descriptor information is transferred to the flash memory 115 a and is backed up along with the writing cache when the supply of power is stopped, it is possible to improve the efficiency of the backup process and the restoration process of the writing cache.

Since the descriptor information on the data not to be backed up indicates that the data is not to be backed up, the transfer of the data not to be backed up is omitted and an increase in the time needed for the backup process is suppressed.

The use of the flash memory 115 a, which is a non-volatile memory, as the destination of the backup allows the writing cache to be held even after the supply of power from the SCU 116 a is stopped.

The supply of sufficient power to the memory in which the data is to be backed up until the restoration allows the writing cache to be held until the restoration with no non-volatile memory used.

Since the cache memory 112 a temporarily stores the data to be read out from and written into the storage devices 120 a to 120 d until the readout and the writing is completed, the content of storage may dynamically varied. Accordingly, accurately managing the latest status of the cache memory 112 a by using the descriptor information allows the efficiency of the backup process to be improved.

Since the descriptor information on writing data is generated upon reception of an instruction to write the writing data from the host computer 300, it is possible to reflect the latest state of the cache memory 112 a in the descriptor information.

Since the address of the descriptor information is associated with the location where the data is stored in the cache memory 112 a, it is possible to simplify the descriptor information and to improve the efficiency of the process of generating the descriptor information, the backup process, and the restoration process.

Since, in storage of data in the cache memory 112 a, the location where the data is stored is determined on the basis of the size of the data to be stored and the free space in the cache memory 112 a, it is possible to prevent the data from being damaged owing to incorrect overwriting in the storage area in the cache memory 112 a.

The storage of the descriptor information on data to be stored in the cache memory 112 a in the storage location in the descriptor table 112 ad 1 associated with the location where the data is stored in the storage area in the cache memory 112 a allows the efficiency of the process of generating the descriptor information, the backup process, and the restoration process to be improved.

Since the next address is used to indicate the initial address of the storage area next to the storage area of certain data, it is possible to improve the efficiency of the process of generating the descriptor information and the backup process.

Since the flash memory 115 a includes the non-volatile storage areas 115 a 1 and 115 a 2, it is possible to concurrently perform the backup process to the non-volatile storage areas 115 a 1 and 115 a 2, thereby reducing the time needed for the backup process.

Even when the supply of power to the control unit 110 a is stopped, the transfer controller 102 receives supply of power from the SCU 116 a to back up the writing cache stored in the cache memory 112 a.

Although the storage apparatus, the control unit, and the method of controlling the storage apparatus are described with reference to the drawings in the above embodiments, the configuration of each component may be replaced with an arbitrary configuration having a similar function. In addition, another arbitrary component or process may be added to the disclosed technology. Furthermore, arbitrary two or more configurations in the above embodiments may be combined to realize the disclosed technology.

The above description indicates only the principle of the technology. Those skilled in the art will recognize that various changes and modifications may be made to the technology. It will be further recognized and understood that the disclosed technology is not restricted to the configuration and applications described above and that all modifications and equivalents are made in the technology and the appended claims are intended to cover all such modifications and equivalents which may fall within the spirit and scope of the technology.

According to the storage apparatus, the control unit, and the method of controlling the storage apparatus, it is possible to speed up the backup process of data to reduce the time needed for the backup process.

All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention. 

What is claimed is:
 1. A storage apparatus comprising: a storage medium configured to store data; and a control unit configured to control access to the storage medium, wherein the control unit includes: a first storage configured to store data to be stored in the storage medium; a second storage configured to store data; a control information generator configured to generate control information indicating a storage state of the data in the first storage; and a transfer controller configured to control transfer of the data stored in the first storage to the second storage on the basis of the control information generated by the control information generator when the supply of power to the control unit is stopped.
 2. A storage apparatus according to claim 1, wherein: the control information includes determination information indicating whether the data stored in the first storage is to be transferred, the control information generator generates the control information so as to include the determination information indicating that the data stored in the first storage is to be transferred if the data stored in the first storage is to be transferred, and the transfer controller controls the data to be transferred, among the data stored in the first storage, so as to be transferred to the second storage on the basis of the control information generated by the control information generator when the supply of power to the control unit is stopped.
 3. A storage apparatus according to claim 2, wherein the control information generator generates the control information so as to include the determination information indicating that the data stored in the first storage is to be transferred if the data to be stored in the storage medium is stored in the first storage.
 4. A storage apparatus according to claim 2, wherein the control information generator generates the control information so as to include the determination information indicating that the data stored in the first storage is not to be transferred if the data to be stored in the storage medium is stored in the storage medium.
 5. A storage apparatus according to claim 1, wherein: the first storage stores the control information, and the transfer controller configured to control transfer of the control information in the first storage to the second storage when the supply of power to the control unit is stopped,
 6. A storage apparatus according to claim 2, wherein: the control information generator generates the control information so as to include the determination information indicating that the data stored in the first storage is not to be transferred if the data stored in the first storage is not to be transferred, and the transfer controller controls the data not to be transferred, among the data stored in the first storage, so as not to be transferred to the second storage on the basis of the control information generated by the control information generating when the supply of power to the control unit is stopped.
 7. A storage apparatus according to claim 1, wherein the second storage is a non-volatile memory,
 8. A storage apparatus according to claim 1, wherein the first storage temporarily stores the data to be stored in the storage medium until writing of the data into the storage medium is completed,
 9. A storage apparatus according to claim 1,wherein, when an instruction to store data in the storage medium is received from a higher-level apparatus, the control information generator generates the control information so as to indicate the storage state of the data for which the storage instruction is issued in the first storage on the basis of the instruction,
 10. A storage apparatus according to claim 1, wherein the control unit further includes: a data controller configured to store data in the first storage part; and a storage location determining unit configured to determine a storage location of the data in a storage area in the first storage when the data is stored in the first storage, wherein the control information generator generates the control information so as to include storage location information indicating the storage location that is of the data stored in the first storage and that is determined by the storage location determining part, and the data controller controls data stored in the second storage part so as to be stored in the storage area in the first storage part on the basis of the storage location information included in the control information generated by the control information generating part when the data stored in the second storage is to be stored in the first storage.
 11. A storage apparatus according to claim 10, wherein the storage location determining unit determines the storage location of data in the storage area in the first storage on the basis of a free space in the storage area in the first storage and a size of the data to be stored in the first storage in the storage of the data in the first storage part, and the data controller controls the data stored in the second storage so as to be stored in the free space in the storage area in the first storage on the basis of the storage location information in the control information generated by the control information generator when the data stored in the second storage part is to be stored in the first storage.
 12. A storage apparatus according to claim 10, wherein the control unit further includes: a control information storage configured to store the control information and a control table in which the location where the control information is stored is associated with the location where the data is stored in the storage area in the first storage, and the control information generator generates the control information on the data stored in the first storage and stores the generated control information at a location which corresponds to the storage location determined by the storage location determining unit and at which the control information is held in the control table.
 13. A storage apparatus according to claim 1, wherein the control information generator generates the control information so as to include subsequent data location information indicating a location in the storage area at which other data subsequent to the data stored in the first storage is capable of being stored.
 14. A storage apparatus according to claim 1, wherein the second storage includes a plurality of storage areas, and the transfer controller controls the transfer of the data stored in the first storage to the second storage such that a plurality of pieces of data resulting from division of the data stored in the first storage are concurrently transferred to the plurality of storage areas on the basis of the control information generated by the control information generator when the supply of power to the control unit is stopped.
 15. A storage apparatus according to claim 1, wherein the control unit further includes: a power for emergency supplying unit configured to supply power to the transfer controller when the supply of power to the control unit is stopped, and the transfer controller receives the supply of power from the power for emergency supplying unit to control the transfer of the data stored in the first storage to the second storage when the supply of power to the control unit is stopped.
 16. A control unit that controls data transfer, the control unit comprising: a first storage configured to store data; a second storage; a control information generator configured to generate control information indicating a storage state of the data in the first storage; and a controller configured to control transfer of the data stored in the first storage to the second storage based on the control information generated by the control information generator when power supply to the control unit is stopped.
 17. A method for data transfer, the method comprising: generating control information indicating a storage state of data in a first storage; and controlling transfer of the data stored in the first storage to a second storage based on the control information when power supply to the first storage is stopped. 